<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
  <!ENTITY nbsp "&#x00A0;">
]>
<xsl:stylesheet
	version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:msxml="urn:schemas-microsoft-com:xslt"
	xmlns:umbraco.library="urn:umbraco.library"
	exclude-result-prefixes="msxml umbraco.library">

  <xsl:output method="xml" omit-xml-declaration="yes"/>
  <xsl:param name="currentPage"/>

  <xsl:template match="/">

    <!-- Root Node -->
    <xsl:variable name="rootNode" select="$currentPage/ancestor-or-self::root" />

    <!-- Homepage -->
    <xsl:variable name="homeNode" select="$rootNode/CWS_Master [@isDoc]" />

    <ul id="navi">


      <xsl:for-each select="$homeNode/* [@isDoc and @level = 2 and string(umbracoNaviHide) != '1']">
        <xsl:sort select="menuOrder" data-type="number" />
        <li>
          <a href="{umbraco.library:NiceUrl(@id)}" >
            <xsl:value-of select="@nodeName" />
          </a>
        </li>
      </xsl:for-each>
    </ul>
  </xsl:template>
</xsl:stylesheet>